package com.wm.doublechromosphere;

import java.util.Random;

public class DoubleChromosphere {
    static int num[]=new int[6];

    public static boolean isFind(int n) {
        boolean isFind = true;
            for(int i = 0;i < num.length;i++) {
                if(n == num[i]) {
                    isFind = false;
                }
        }
        return isFind;
    }

    public static void main(String[] args) {
        Random rand = new Random();

        for(int i = 0;i < num.length;i++)
        {
            if(num[i] == 0)
            {
                int n;
                boolean isFind = false;
                do {
                    n = rand.nextInt(33)+1;
                    isFind = isFind(n);
                }while(!isFind);
                num[i] = n;
            }
        }
        int num2 = rand.nextInt(16)+1;
        System.out.println("双色球预测号:");
        for(int i = 0;i < num.length;i++)
        {
            System.out.print(num[i]);
            if(i == num.length-1)
            {
                System.out.println(" + "+num2);
                break;
            }
            System.out.print(",");
        }

        System.out.println("预祝您早日中大奖！");

    }
}
